Full sweep: bug fixes, country metadata, 14 languages, API improvements#1
Merged
Conversation
…8n, API polish) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…sprints) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…eckout@v6 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…oding Adds a Gradle task that writes BuildKConfig.kt into the build directory with the version read from libs.versions.kcountries, keeping Countries.VERSION in sync with the published artifact version automatically. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace the length-in-4..8 check with de.cketti.codepoints validation that requires exactly 2 regional indicator codepoints (U+1F1E6..U+1F1FF), rejecting ASCII strings like "ABCD" that previously passed the length check. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…slations, fix SDK versions and Locale annotation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…imezone and populate all 249 entries Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…region, calling code, currency, timezone Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…continent, region, timezone Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…, update tests for 13 locales Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…or{}/nameContains edge cases
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR delivers a broad KCountries “full sweep” update: it fixes CI/build issues, extends the Country model with richer geographic/telecom/financial metadata, expands i18n coverage to 13 translation locales (plus EN fallback), and improves the query DSL/API surface across KMP targets.
Changes:
- Extend core model & APIs: add
Continent/Regionenums andCallingCode/CurrencyCode/TimezoneIdvalue types; expose new repository methods, DSL predicates, and string extensions. - Expand i18n: add 7 new translation locales (JA/PT/HI/KO/IT/TR/ID), fill ZH gaps, normalize string locale inputs, and tighten translation completeness tests.
- Operational/docs/sample updates: fix CI workflows, generate
Countries.VERSIONfrom the version catalog, update sample UI and READMEs accordingly.
Reviewed changes
Copilot reviewed 42 out of 43 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| sample/src/commonMain/kotlin/org/kimplify/sample/App.kt | Adds new locales to picker, updates language count, and displays new country metadata fields. |
| gradle/libs.versions.toml | Updates dependency/plugin versions in the version catalog. |
| docs/superpowers/specs/2026-03-24-kcountries-full-sweep-design.md | Adds a design spec documenting the intended multi-sprint changes. |
| docs/superpowers/plans/2026-03-24-kcountries-full-sweep.md | Adds an implementation plan for the full sweep work. |
| countries-i18n/src/commonTest/kotlin/org/kimplify/countries/i18n/TranslationTest.kt | Updates tests for 13 locales, locale normalization, and full 249-coverage assertions. |
| countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/extensions/CountryI18nExtensions.kt | Normalizes locale strings like es-MX/PT_BR and adds graceful fallback behavior. |
| countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/data/TurkishTranslations.kt | Adds TR translation map. |
| countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/data/SpanishTranslations.kt | Removes orphaned XK translation entry. |
| countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/data/RussianTranslations.kt | Removes orphaned XK translation entry. |
| countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/data/PortugueseTranslations.kt | Adds PT translation map. |
| countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/data/KoreanTranslations.kt | Adds KO translation map. |
| countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/data/JapaneseTranslations.kt | Adds JA translation map. |
| countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/data/ItalianTranslations.kt | Adds IT translation map. |
| countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/data/IndonesianTranslations.kt | Adds ID translation map. |
| countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/data/HindiTranslations.kt | Adds HI translation map. |
| countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/data/GermanTranslations.kt | Removes orphaned XK translation entry. |
| countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/data/FrenchTranslations.kt | Removes orphaned XK translation entry. |
| countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/data/ChineseTranslations.kt | Removes XK and fills missing CN/HK/MO/SG/TW translations. |
| countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/data/ArabicTranslations.kt | Removes orphaned XK translation entry. |
| countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/Locale.kt | Adds new locale constants and normalizes annotation import style. |
| countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/CountryTranslations.kt | Registers new locale maps and normalizes string locale inputs for lookups. |
| countries-i18n/build.gradle.kts | Aligns Android SDK values with the version catalog. |
| countries-i18n/README.md | Updates module docs to reflect new locales, normalization behavior, and coverage. |
| countries-core/src/commonTest/kotlin/org/kimplify/countries/testdata/TestCountries.kt | Updates test fixtures to include new required Country fields. |
| countries-core/src/commonTest/kotlin/org/kimplify/countries/repository/CountriesRepositoryTest.kt | Adds repository method tests for continent/region/calling code/currency queries. |
| countries-core/src/commonTest/kotlin/org/kimplify/countries/model/CountryMetadataValidationTest.kt | Adds validation tests for new metadata value classes. |
| countries-core/src/commonTest/kotlin/org/kimplify/countries/model/CountryCodesValidationTest.kt | Tightens FlagEmoji validation expectations (codepoint-based). |
| countries-core/src/commonTest/kotlin/org/kimplify/countries/extensions/CountryExtensionsTest.kt | Adds tests for new string metadata extension properties. |
| countries-core/src/commonTest/kotlin/org/kimplify/countries/dsl/CountriesQueryTest.kt | Adds tests for new DSL predicates, iterable results, not {}, and edge cases. |
| countries-core/src/commonMain/kotlin/org/kimplify/countries/repository/CountriesRepository.kt | Adds repository API for new metadata and corresponding indices in in-memory repo. |
| countries-core/src/commonMain/kotlin/org/kimplify/countries/model/Region.kt | Adds Region enum (UN geoscheme-based). |
| countries-core/src/commonMain/kotlin/org/kimplify/countries/model/CountryMetadata.kt | Adds CallingCode, CurrencyCode, and TimezoneId value classes with validation. |
| countries-core/src/commonMain/kotlin/org/kimplify/countries/model/CountryCodes.kt | Updates FlagEmoji validation to use Unicode codepoints. |
| countries-core/src/commonMain/kotlin/org/kimplify/countries/model/Country.kt | Extends Country with continent/region/callingCode/currency/timezone fields. |
| countries-core/src/commonMain/kotlin/org/kimplify/countries/model/Continent.kt | Adds Continent enum. |
| countries-core/src/commonMain/kotlin/org/kimplify/countries/extensions/CountryExtensions.kt | Adds string extensions for new metadata fields. |
| countries-core/src/commonMain/kotlin/org/kimplify/countries/dsl/CountriesQuery.kt | Adds @DslMarker, new predicates, not {}, iterable results, and edge case guards. |
| countries-core/src/commonMain/kotlin/org/kimplify/countries/Countries.kt | Switches Countries.VERSION to be generated via BuildKConfig. |
| countries-core/build.gradle.kts | Adds version-file generation task and aligns Android SDK values to the version catalog. |
| README.md | Updates top-level docs for new metadata, expanded i18n, and DSL/API changes. |
| .github/workflows/publish.yml | Updates checkout action version in publish workflow. |
| .github/workflows/build.yml | Fixes CI task paths, runs both modules’ tests, and updates artifact upload paths. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
diogocavaiar
approved these changes
Mar 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
:deci:refs), hardcoded VERSION, FlagEmoji validation, data inaccuracies (Turkey/Belgium/Peru), orphaned Kosovo translations, SDK version mismatchesContinent/Regionenums andCallingCode/CurrencyCode/TimezoneIdvalue classes"en-US","ES"no longer crash)CountriesQueryResultimplementsIterable,@DslMarkerannotation,not{}combinator, fixedor{}/nameContains("")edge cases